//go:build wireinject

package startup

import (
	"github.com/google/wire"
	"jk-time/webook/interactive/cache"
	"jk-time/webook/interactive/dao"
	"jk-time/webook/interactive/grpc_service"
	"jk-time/webook/interactive/repository"
	"jk-time/webook/interactive/service"
)

var thirdPartySet = wire.NewSet(
	//最基础第三方依赖
	InitRedis,
)
var interactiveSvcSet = wire.NewSet(
	InitDB,
	dao.NewGormInteractiveDAO,
	cache.NewRedisInteractiveCache,
	repository.NewCacheInteractiveRepository,
	service.NewInteractiveService,
	grpc_service.NewInteractiveServiceServer,
)

func InitInteractiveServiceServer() *grpc_service.InteractiveServiceServer {
	wire.Build(
		thirdPartySet,
		interactiveSvcSet,
	)
	return new(grpc_service.InteractiveServiceServer)
}
